<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
	<style type="text/css">
		canvas{
			background: #eee;
		}
	</style>
</head>
<body>
<canvas id="qcanvas"></canvas>
<script type="text/javascript" src="./example/js/Qcanvas.js"></script>
<script type="text/javascript">
	var qcanvas = new Qcanvas(["qcanvas",300,200]);
	 
qcanvas.load({
	"b":"./example/img/img.png"
},function(){ 
	var b = qcanvas.getSourceByName("b");
	
	
	qcanvas.qimg.img({
		img:b,
		sStart:[0,0],
		sWidth:b.width,
		sHeight:b.height,
		size:"cover",
		tStart:[100,0],
		tWidth:50,
		tHeight:120,
		degree:30,
		mousemove:function(position){
			console.log(position);
		}
		
	});
	
	
});	
qcanvas.loadImgSource("./example/img/img.png").then(function(img){
	var b = img[0];
	qcanvas.qimg.img({
		img:b,
		sStart:[0,0],
		sWidth:b.width,
		sHeight:b.height,
		size:"cover",
		tStart:[150,0],
		tWidth:50,
		tHeight:120,
		degree:30,
		mousemove:function(position){
			console.log(position);
		}
		
	});
})

qcanvas.qimg.img({
		img:'./example/img/img.png',
		sStart:[0,0],
		tStart:[200,0],
		tWidth:50,
		tHeight:120,
		degree:30,
		mousemove:function(position){
			console.log(position);
		}
		
	});
</script>
</body>
</html>